//
//  BYJDataBaseHandle.h
//  UI14_豆瓣完整版
//
//  Created by dllo on 16/1/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
@class MovieModel;
@class ActivityModel;
@class UserModel;


@interface BYJDataBaseHandle : NSObject {
    
    // 数据库
    sqlite3 *dbPoint;
}

+ (BYJDataBaseHandle *)sharedDataBaseHandle;

// 打开沙盒
- (void)openDB;

// 创建movie表
- (void)createMoviewTabel;

// 创建activity表
- (void)createActivityTabel;

// 插入到movie
- (void)insertMovieModel:(MovieModel *)model;

// 插入到activity表
- (void)insertActivityModel:(ActivityModel *)model;

// 删除movie
- (void)deleteMovieModel:(MovieModel *)model;

// 删除activity
- (void)deleteActivityModel:(ActivityModel *)model;

// 查询movie
- (NSMutableArray *)selectMovieTable;

// 查询activity
- (NSMutableArray *)selectActivityTable;




// 创建user表
- (void)createUserTabel;

// 插入到user
- (void)insertUserModel:(UserModel *)model;

// 删除user
- (void)deleteUserModel:(UserModel *)user;

// 查询User
- (NSMutableArray *)selectUserTable;


@end
